/**
 * @ author: 汪孟苹
 */
define(["oms_config/root", "fu/template/workBench/workBench_babyList.tpl"], function ($root, $tpl) {
	var tpl = {};

	/* 计划随访患者.列表 */
	tpl.init3 = function () {
		var config = $root.init();
		var html = '';
		html += $tpl[config.tpl.workBenchBabyList](); // 配置在配置文件里的函数html
		return html;
	}
	/* 计划随访患者.姓按钮 */
	tpl.init4 = function () {
		var html = '';
		html += FirstName();
		return html;
	}
	/* 计划随访患者.队列select */
	tpl.init5 = function () {
		var html = '';
		html += selectQueue();
		return html;
	}
	/* 计划随访患者.底部统计 */
	tpl.init6 = function () {
		var html = '';
		html += windowBottomStatistics();
		return html;
	}
	/* 计划随访患者.顶部统计 */
	tpl.init7 = function () {
		var html = '';
		html += windowTopStatistics();
		return html;
	}
	/* 今日门诊记录.右侧 */
	tpl.init8 = function () {
		var html = '';
		html += windowOperateList();
		return html;
	}

	var FirstName = function () {
		return '<script id="tpl_workBench_firstName" type="text/html">' +
			'   {{each rows as value i}}' +
			'	    <button type="button" class="btn btn-default">{{value}}</button>' +
			'	{{/each}}' +
			'</script>';
	}
	var selectQueue = function () {
		return '<script id="tpl_workBench_select" type="text/html">' +
			'	  	<option value="">全部队列</option>' +
			'		{{each rows as value i}}' +
			'	  		<option value="{{value.id}}">{{value.queueName}}</option>' +
			'		{{/each}}' +
			'</script>';
	}
	var windowBottomStatistics = function () {
		return '<script id="tpl_workBench_bottomStatistics" type="text/html">' +
			'	计划{{windowPtTotal}}人/已随访{{windowPtFinish}}人/进行中{{windowPtGoing}}人' +
			'</script>';
	}
	var windowTopStatistics = function () {
		var config = $root.init();
		return '<script id="tpl_workBench_topStatistics" type="text/html">' +


			'<ul style="width: 100%;display: flex;position: fixed;top: 60px;left:30%;z-index: 99;">' +
			'   <li style="width: 8%;"><div class="dashboard-report-label" style="font-size: 16px">今日门诊人数:{{dayIncrDoorNum}}人</div> </li>' +
			'   <li style="width: 8%"><div class="dashboard-report-label" style="font-size: 16px" data-language="true" data-language-key="workBenchTodaypatient">今日建档患者:{{dayIncrPtNum}}人</div></li>' +
			'   <li style="width: 8%"><div class="dashboard-report-label" style="font-size: 16px" data-language="true" data-language-key="workBenchTodaypatienttotal">随访患者总数:{{followPtTotal}}人</div></li>' +
			'   <li style="width: 8%"><div class="dashboard-report-label" style="font-size: 16px">今日失访人数:{{dayLostNum}}人</div></li>' +
			'</ul>' +
			'		<div class="dashboard-report-card dashboard-add" style="padding: 0; width: 10%;height: 40px;position: fixed;top: 99px;right: 100px;z-index: 99;background-color: #f5f5f5">'+
			'			<div class="text-center" id="addPatient" style="width: 100%;height: 100%">'+
			// '				<div><i class="fa fa-plus dashboard-add-icon"></i></div>'+
			'				<div class="dashboard-add-label" data-language="true" data-language-key="workBenchAddpatient" style="height:40px;font-size: 20px;line-height: 40px">' + '<span style="font-size: 25px">+</span>' +config.language.workBenchAddpatient+ '</div>'+
			'			</div>'+
			'		</div>'+

			'</script>';
	}
	var windowOperateList = function () {
		return '<script id="tpl_workBench_operateList" type="text/html">' +
			'{{each rows as value i}}' +
			'	<div class="row baby-done">' +
			'		<div class="col-sm-6 col-md-6 ellipsis-1">{{value.patientName}}</div>' +
			'		<div class="col-sm-6 col-md-6 ellipsis-1 text-right color-9">{{value.dealTime}}</div>' +
			'	</div>' +
			'{{/each}}' +
			'</script>';
	}

	return tpl;
});
